/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mythinking;

import java.util.Vector;

/**
 *
 * @author jzou
 */
public class Main {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // ASCII(args);
        // randomDemo(40);
        // generateNames();
        generateGrid();
    }

    public static void generateGrid() {
        Vector grid = new Vector();
        for (int i = 0; i < 10000000; i++) {
            Vector node=new Vector(5);
            node.add("a");
            node.add("b");
            node.add("c");
            node.add("d");
            node.add("e");
            grid.add( node );

            if ( i%1000 == 0 )
                System.out.println(i);
        }

        java.util.Vector nodes = new Vector();
        for (int i = 0; i < 10; i++) {
            int num = 1;
            for (int j = 0; j < i; j++) {
                num *= 10;
            }
            for (int k = 0; k < num; k++) {
                // System.out.println(k);
                nodes.add(new Integer(k));
                if (k % 10000 == 0) {
                    System.out.println(nodes.capacity());
                    System.out.println(k);
                }
            }
        }
    }

    public static void generateNames() {
        for (int i = 0; i < 1000000; i++) {
            System.out.println("User " + i);
        }
    }

    public static void randomDemo(int num) {
        for (int j = 0; j < 40; j++) {
            for (int i = 0; i < num; i++) {
                long randInt = java.lang.Math.round(java.lang.Math.random() * 100);
                System.out.print(randInt + " ");
            }
            System.out.println();
        }
    }

    public static void ASCII(String[] args) {
        // TODO code application logic here
        for (int j = 0; j < 1; j++) {
            int ascii = 0;
            for (int i = 0; i < 255; i++) {
                ascii = j * 255 + i;
                // System.out.print( ascii + " ");
                System.out.print(new Character((char) ascii) + " ");
                if (ascii % 80 == 0) {
                    System.out.println();
                }
            }
            System.out.println();
        }
    }
}
